﻿// <copyright>
// Copyright (c) 2008 - 2009, Microsoft, All Rights Reserved
// </copyright>
//
// Licensed under the Microsoft Public License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at 
//
// http://www.opensource.org/licenses/ms-pl.html

namespace LiveLabs.Logging.Util
{
    using System;
    using System.Threading;

    /// <summary>
    /// Simple extensions to the Exception class
    /// </summary>
    internal static class ExceptionExtensions
    {
        internal static bool IsImportant(this Exception @this)
        {
            if (@this == null)
            {
                return false;
            }

            return 
                @this is StackOverflowException ||
                @this is OutOfMemoryException ||
                @this is ThreadAbortException;
        }
    }
}
